package com.beauty.dressing.rxandroid.api;

import com.beauty.dressing.common.bean.BaseParse;
import com.beauty.dressing.common.bean.ExtraParser;
import com.beauty.dressing.common.bean.LeaseItem;
import com.beauty.dressing.common.bean.LeaseItemDetail;
import com.beauty.dressing.common.bean.MultiShopList;
import com.beauty.dressing.common.bean.SaleItem;
import com.beauty.dressing.common.bean.SaleItemDetail;
import com.beauty.dressing.common.bean.SubMultiLease;
import com.beauty.dressing.common.bean.SubMultiSale;
import com.beauty.dressing.common.bean.User;

import java.util.ArrayList;
import java.util.Map;

import io.reactivex.Observable;
import retrofit2.http.Field;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;

/**
 * 对应后台/order工程
 *
 * @author xutingz
 * @E-mail xutz@xianlanba.com
 * @date 2018/04/11
 */

public interface ShopApi {

    @POST("index")
    Observable<BaseParse<MultiShopList,Object>> shopIndexList(); //商城首页

    @POST("salesClass")
    Observable<BaseParse<Object,SubMultiSale>> saleMoreList(); //商城更多

    @POST("leaseClass")
    Observable<BaseParse<Object,SubMultiLease>> leaseMoreList(); //商城更多

    @FormUrlEncoded
    @POST("salesGoods")
    Observable<BaseParse<Object,SaleItem>> singSaleList(@Field("class_id") long class_id); //

    @FormUrlEncoded
    @POST("leaseGoods")
    Observable<BaseParse<Object,LeaseItem>> singLeaseList(@Field("class_id") long class_id); //

    @FormUrlEncoded
    @POST("leaseInfo")
    Observable<BaseParse<LeaseItemDetail,Object>> leaseDetail(@Field("lease_id") long lease_id); //租赁详情

    @FormUrlEncoded
    @POST("salesInfo")
    Observable<BaseParse<SaleItemDetail,Object>> saleDetail(@Field("sales_id") long sales_id); //租赁详情

    @FormUrlEncoded
    @POST("salesInfo")
    Observable<ExtraParser<Object,User>> testTestTest(@Field("sales_id") long sales_id); //租赁详情

}
